// import Vue from 'vue'
// import Vuex from 'vuex'


// import {state,} from './modules/directSearch'

// import getters from './getters'

// Vue.use(Vuex)

// export default new Vuex.Store({
//   modules: {
//     directSearch
//   },
//   getters
// })
export const state = () => ({ queryParam: null, dataSource: [] })
export const mutations = {
  SET_QUERYPARAM: (state, fields) => {
    console.log('queryParam', fields)
    state.queryParam = fields
  },
  SET_DATASOURCE: (state, fields) => {
    console.log('dataSource', fields)
    state.dataSource = fields
  },
}
export const actions = {
  setQueryParam({ commit }, param) {
    commit('SET_QUERYPARAM', param)
  },
  setDataSource({ commit }, param) {
    commit('SET_DATASOURCE', param)
  },
}

export const getters = {

  queryParam: state => state.directSearch.queryParam,
  dataSource: state => state.directSearch.dataSource,


}
